#!/bin/bash
#
# lock1.sh - lock version 1
# This program locks the terminal window, and you
#  must type a password to unlock it.
# Program logic:
#   1 - Clear the screen and ask the user to enter a password and store it 
#   2 - User now has to enter the password again
#   3 - Check if the password is correct to continue
# From: Unix Unbounded by Amir Afzal
#
clear            # clear the screen
echo -n "Please enter a password and the screen will be locked until you enter this password again: "
read pass
clear
echo "Screen is locked ... "
guess=
#
until [ "$pass" = "$guess" ]
do
   read guess
done

